1. Field of the Invention
The present invention relates to a painting-out system for graphic systems, and more specifically to a painting-out pattern reference system for painting an inside area surrounded by a contour of a graphic pattern stored in a memory to be indicated on a screen of a display, by repeating a pattern defined in another area.
2. Description of Related Art
Hitherto, the inside of a graphic pattern stored in a memory to be indicated on a screen of a display system has been painted out not only by a mono-color but also by using a pattern defined in another area. For the latter purpose, conventional systems have been such that a painting-out pattern is defined in a memory in the form of a pattern having a width of one word and a height of any length. Ordinarily, one word is composed of 8 bits, 16 bits, or 32 bits, so as to correspond to a bus structure being used in the hardware. In addition, the painting-out pattern is developed in the overall memory, as painting-out tiles being laid over an overall area defined in the memory by matching a boundary of words with each other. In the case of painting-out an inside of a given graphic pattern drawn in a memory, the painting-out pattern is drawn in only the inside of the graphic pattern.
For example, assuming a pattern as shown in FIG. 1A, this pattern is developed in a memory as an imaginary pattern shown in FIG. 1B. If an inside of a rectangle ABCD shown in FIG. 1C is painted out by the pattern shown in FIG. 1A, the pattern shown in FIG. 1A is drawn within only the inside of the rectangle ABCD.
Here, the imaginary pattern shown in FIG. 1B is not actually stored over the whole of the memory. When the painting-out processing shown in FIG. 1C is performed, the painting-out processing is realized by controlling an address referring to the pattern shown in FIG. 1A, as if the pattern shown in FIG. 1A is repeated to extend over the whole of the memory.
Now, considering the case of painting out the inside of the rectangle ABCD, the painting-out processing is executing for the rectangle ABCD from an uppermost side AD, line by line. When an uppermost line is painted, an address of the pattern shown in FIG. 1A corresponding to the uppermost line is previously calculated. For this calculation, various methods have been known. However, the most ordinary method has been to perform the calculation on the basis of a Y-coordinate of an apex A of the rectangle. For example, assuming that the Y-coordinate of the apex A of the rectangle is Ya, the address PAD of the pattern firstly referred to can be expressed as follows: EQU PAD=PTNP+{PTNC-(YA mod PTNC}
where
PTNP is a starting address for defining the pattern; PA1 PTNC is the number of the patterns defined in the vertical direction; and PA1 "mod" indicates a reminder when Ya is divided by PTNC; and PA1 therefore, (Ya mod PTNC) indicates the number of words
from PAD to the lowermost line of the pattern and will be called "PC" hereinafter.
For the purpose of out the uppermost line of the rectangle ABCD, the pattern of the address PAD is read out and repeated to paint out the uppermost line. When the painting-out processing is moved to a next line just below the uppermost line, a following calculation is performed for a reference address PAD of the pattern: EQU PAD=PAD+1
The painting-out processing is performed by reading a pattern on the address thus obtained. At this time, however, the following calculation is simultaneously performed: EQU PC=PC-1
As a result, if PC becomes negative, the following processing is performed: EQU PAD=PTNP EQU PC=PTNC
Thereafter, the pattern at the address PAD is read out and the painting-out processing is performed. Thus, continuity of the pattern in a vertical direction is ensured. Accordingly, if the above mentioned processing is downwardly repeated line by line, the inside of the rectangle ABCD is painted out with the pattern shown in FIG. 1A.
As seen from the above, the conventional system has been such that it is allowed to define only the width or horizontal length of the pattern. Therefore, when the painting-out processing is performed in a horizontal direction, it is sufficient if the same pattern is repeatedly used without the necessity of controlling the reference address of the pattern. In other words, it is sufficient if the reference address is controlled only when the vertical painting-out processing is performed.
However, a high degree of display has been recently desired, and in this case, the one word width of the painting-out unitary pattern is no longer sufficient. In addition, the resolution of the display has been increased, and therefore, the width of one word has already become of very minute size on the display screen. Accordingly, in order to comply with various painting-out patterns, it has become necessary to define a wider pattern.
As one means for extending or spreading the width of the pattern, it is considered to elongate the bit length of one word. However, this method requires modification of hardware including expansion of the bus width, and therefore, an increased amount of hardware is needed. In addition, in order to realize variable bit length of word, a very complicated hardware becomes necessary.
As another means for extending or spreading the width of the pattern, it is considered to define a painting-out unitary over a few words and to control the repetition of the unitary pattern when the painting-out processing is executed. In this method, however, in order to freely define the width of the unitary pattern, pattern reference address control is required not only in the vertical direction but also in a horizontal direction. For simultaneously realizing this pattern referring address controls in both the directions, very complicated software is required.
In addition, for this control, not only a comparison processing for the uppermost limit and the lowermost limit but also a comparison processing the rightmost limit and the leftmost limit is required. In the conventional system which does not require the control of the repetition of the unitary pattern in the horizontal direction, it is sufficient if the comparison in the vertical direction is performed very time one line has been painted out. On the other hand, in order to control the repetition of the unitary pattern in the horizontal direction, the comparison processing must be performed each time one word in a horizontal direction is painted out. As a result, the processing speed decreases remarkably.